package com.group9.handinhand.controller.form;

import java.util.Arrays;
import java.util.List;

import com.group9.handinhand.service.so.CommunitySO;
/**
 * @class this class for creating community form.
 * 
 * 
 * */
public class CommunityCreateForm {
	
	CommunitySO community;
	String selectedTags;

	public/**
	
	*A getter method for community.
	*@return community
	*/
		CommunitySO getCommunity() {
		return community;
	}/**
	
	* A setter method. 
	* @param community
	* */
	public void setCommunity(CommunitySO community) {
		this.community = community;
	}/**
	
	* A getter method for tags of the community.
	* @return selectedTags
	*/
	public String getSelectedTags() {
		return selectedTags;
	}/**
	
	* A setter method for setting selected tags for the community
	* @param selectedTags
	*/
	public void setSelectedTags(String selectedTags) {
		this.selectedTags = selectedTags;
	}/**
	
	* A getter method.
	* Gets the all tags as a list for the community.
	* @return array
	*/
	public List<String> getSelectedTagsAsList() {
		String[] tags = selectedTags.split(",");
		return Arrays.asList(tags);
	}
	
	
}
